Skip to content

Add OverkizClientSettings for RTS default duration and future extensibility#2018

Merged
iMicknl merged 8 commits intov2/mainfrom
v2/client_settings
Apr 25, 2026
Merged

Add OverkizClientSettings for RTS default duration and future extensibility#2018
iMicknl merged 8 commits intov2/mainfrom
v2/client_settings

Conversation

@iMicknl
Copy link
Copy Markdown
Owner

@iMicknl iMicknl commented Apr 25, 2026

No description provided.

iMicknl added 5 commits April 25, 2026 15:15
Add OverkizClientSettings to group behavioral configuration for OverkizClient.
Includes action_queue (ActionQueueSettings | None) and rts_command_duration (int | None).
This replaces the standalone action_queue constructor param and enables RTS duration injection.
Replace the standalone `action_queue` parameter with
`settings: OverkizClientSettings | None` to consolidate all
behavioral configuration into a single entry point. This is a
v2 breaking change.
Add _apply_rts_duration method that inspects each action's device URL
protocol and appends rts_command_duration to RTS commands whose
CommandDefinition.nparams allows an extra parameter. Original actions
are never mutated. This replaces the hardcoded COMMANDS_WITHOUT_DELAY
exclusion list previously needed in Home Assistant.
Copilot AI review requested due to automatic review settings April 25, 2026 18:12
@iMicknl iMicknl requested a review from tetienne as a code owner April 25, 2026 18:12
@iMicknl iMicknl added enhancement New feature or request breaking v2 labels Apr 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a structured OverkizClientSettings object to centralize behavioral configuration for OverkizClient, and adds RTS-specific command-parameter injection logic when executing action groups.

Changes:

  • Add OverkizClientSettings (action queue settings + RTS command duration).
  • Add RTS duration parameter injection in OverkizClient.execute_action_group() for RTS devices.
  • Add Device.get_command_definition() helper and expand test coverage for the new behaviors.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyoverkiz/client_settings.py Introduces the new settings dataclass for client behavior.
pyoverkiz/client.py Switches constructor to settings=... and injects RTS duration in execute_action_group().
pyoverkiz/models.py Adds Device.get_command_definition() used by injection logic.
tests/test_rts_injection.py New tests covering RTS duration injection behavior and mutation safety.
tests/test_models.py Adds tests for Device.get_command_definition().
tests/test_client_settings.py New unit tests for OverkizClientSettings defaults/fields.
tests/test_client_queue_integration.py Updates queue integration tests to use settings=OverkizClientSettings(...).
tests/test_client.py Adds integration assertions for settings -> client internal fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyoverkiz/client.py
Comment thread tests/test_rts_injection.py
Comment thread pyoverkiz/client.py
@iMicknl iMicknl merged commit d11288e into v2/main Apr 25, 2026
8 checks passed
@iMicknl iMicknl deleted the v2/client_settings branch April 25, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking enhancement New feature or request v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants